<?php
/**
 * Template Name: Giải pháp
 * @package AGILSUN
 * Author: Mr. Hao <haonguyen.agilsun@gmail.com>
 */
?>
<?php get_header(); ?>

<?php if (have_posts()) : the_post(); ?>

<!-- main body of #main -->
<div id="main" role="main">
    <div>
        <li class="breadcrumb-sevices">
            <section class="container">
                <h2> <?php the_title(); ?> </h2>
                <h3> <?php echo get_field( 'short_page_description' ); ?></h3>
            </section>
        </li>
    </div>
    <section class="container">
        <ul class="services-ul">
            <li class="services-top-content">
                <div class="row">
                    <div class="col-md-6">
                        <?php the_content(); ?>
                    </div>
                    <div class="col-md-6"><?php the_post_thumbnail(); ?></div>
                    <div style="height: 20px; clear: both;"></div>
                </div>
                <span class="shadow"></span> </li>
            <!-- end top-content-->
            <li class="mid-content">
                <h2> Why choose us <a href="#">AGILSUN?</a></h2>
                <div class="row col-md-12">
                    <div class="col-md-4 col-1">
                    	<?php
                        	$page_1 = get_field('why_choose_pages_1');
							$page_2 = get_field('why_choose_pages_2');
							$page_3 = get_field('why_choose_pages_3');
						?>
                        <h3> <?php echo $page_1->post_title; ?> </h3>
                        <p> <?php echo $page_1->post_excerpt; ?> </p>
                        <a href="<?php echo get_permalink($page_1->ID); ?>"> __xem thêm</a> </div>
                    <div class="col-md-4 col-2">
                        <h3> <?php echo $page_2->post_title; ?> </h3>
                        <p> <?php echo $page_2->post_excerpt; ?> </p>
                        <a href="<?php echo get_permalink($page_2->ID); ?>"> __xem thêm</a></div>
                    <div class="col-md-4 col-3">
                        <h3> <?php echo $page_3->post_title; ?> </h3>
                        <p> <?php echo $page_3->post_excerpt; ?> </p>
                        <a href="<?php echo get_permalink($page_3->ID); ?>"> __xem thêm</a></div>
                </div>
            </li>
            <!-- end mid-content-->
            <li class="home-project">
                    <h1>Dịch vụ</h1>
                    <div id="related2" class="grid_9 flexslider service-bot-content">
                        <ul class="slides">
                        	
                            <?php 	
								$args = array(
											'posts_per_page' => 12,
											'post_type' => 'post',
											'category_name' => 'dich-vu'
										);
								
								$projects_query = new WP_Query($args);
							?>
							<?php if($projects_query->have_posts()) : ?>
							<?php while($projects_query->have_posts()) : $projects_query->the_post() ?>
                        
                            <li class="m-thumb entry-image hover-content">
                            	<a href="<?php the_permalink(); ?>" class="hover-content">
									<?php the_post_thumbnail('psize'); ?>
                                </a>
                                <h2> <?php the_title(); ?> </h2>
                                <p> <?php the_excerpt(); ?> </p>
                                <a class="read-more" href="<?php the_permalink(); ?>">xem thêm</a>
                            </li>
                            
                            <?php endwhile; ?>
                            <?php endif; ?>
                        </ul>
                    </div>
                </li>
        </ul>
    </section>
</div>
<!-- end of div#main -->

<?php endif; ?>

<?php get_footer(); ?>
